package com.gugee.ins.common.dal.mapper.product;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gugee.ins.common.model.mysql.product.InsRelMediaProduct;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


/**
 * <p>
 * ins帖子商品关联表 Mapper 接口
 * </p>
 *
 * @author HuangXin
 * @since 2021-02-25
 */
public interface InsRelMediaProductMapper extends BaseMapper<InsRelMediaProduct> {

    /**
     * 查找是否存在，存在则返回
     * @param productId
     * @param shortcode
     * @return
     */
    @Select("select id from ins_rel_media_product where product_id = #{productId} and shortcode = #{shortcode} ")
    Long findExist(@Param("productId")long productId,@Param("shortcode")String shortcode);
}
